import { createRouter, createWebHistory } from "vue-router";
import { routes } from "@/routes/index.js";
export var router = createRouter({
    history: createWebHistory(),
    routes,
    scrollBehavior(to, from, savedPosition) {
        return { top: 0 }
    }
})
router.beforeEach((to, from, next) => {
    document.title = to.meta.title
    if (to.fullPath === '/about') {
        const stat = confirm('确定要访问关于页面吗？')
        if (stat) {
            next()
        } else {
            next(false)
        }
    } else {
        next()
    }
})